Repository navigation
fix(cmind): handle list meta.path in GraphQueryEngine search - #105
Open
MattThomas-fastino wants to merge 1 commit into
Open
MattThomas-fastino wants to merge 1 commit into
MattThomas-fastino wants to merge 1 commit into
Conversation
enrich_from_code stores a list when a feature group or area spans more than one file. Search assumed a string and crashed on .lower(). Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
search_rpgcrashes with'list' object has no attribute 'lower'on any graph that has been throughrun_update_rpg.RPGService.enrich_from_code(called withalign_only=Truefromrun_update_rpg) still runs_enrich_group_pathsand_enrich_l1_paths. When a feature group spans more than one file, or a functional area spans more than one directory, those steps storemeta.pathas asortedlist. The rest of the package already accepts that shape (paths = p if isinstance(p, list) else [p]inservice.pyandmodels.py).GraphQueryEnginewas the reader that still assumed a string.Two consequences in
_search_rpg_tree:":" in meta_pathon a list is a membership test, not a substring test, so the path is left as a list.file_part.lower()then raisesAttributeError.The same list also crashes
_normalize_pathvia.startswithwhen_dep_graph_code_diris set. Search, node detail, and tree listing all go through that helper.scope="code"was unaffected.scope="all"(the default) was not, because it also searches the feature tree.Fix
isinstance(..., list)idiom as the writers._normalize_path, so the legacy code-dir prefix is stripped from each one. A list stays a list in the result.Reproduction
Tests
CoderMind/tests/test_graph_query_meta_path.pyfails onmainwith the.lower()and.startswitherrors, and passes with this change.test_path_format.pyis unchanged and still passes.Made with Cursor